<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%String sendResult=(String)request.getAttribute("sendResult");
if(sendResult!=null){ %>
<%=sendResult %><br>
<a href="Index.jsp">Click here to login</a>
<%} else{%>
<title>Enter Your Email Address</title>
</head>
<body>
<form name="forgotPassword" action="ForgotPassword.do" method="post" onsubmit="return validateForm();">
Email Address  :  <input name="loginEmail" size=50 type="text" />
<INPUT TYPE="SUBMIT" VALUE="Submit"> </form>
</body>
<script>
function validateForm()
{
	var x=document.forms["forgotPassword"]["loginEmail"].value;
	var atpos=x.indexOf("@");
	var dotpos=x.lastIndexOf(".");
	if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
  {
  alert("Not a valid e-mail address");
  return false;
  }
if (x==null || x=="")
  { 
  alert("Please Enter Your Email Address");
  return false;
  }
}
  </script>
  <%} %>
</html>